package demo.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import demo.entity.Message;

public interface MessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Message record);

    int insertSelective(Message record);

    Message selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Message record);

    int updateByPrimaryKey(Message record);
  


  
    //查询我的便签
    List<Message> findByreceiveSend(@Param("receiveSendid")Integer receiveSendid,@Param("pageNo")Integer pageNo,@Param("pageSize")Integer pageSize);
 
    //查询便签的条数
    int findreceiveSendIdCount(@Param("receiveSendid")Integer receiveSendid);
    //查询每条信息
    List<Message> findMessageStateCount(@Param("receiveId")Integer receiveId);
    //查询当前正在和我聊天的人
    List<Message> findMessageByNotSendid(@Param("sendid")Integer sendid);
    //查询我和这个人的聊天记录
    List<Message>findMessageByMyidAndSendid(@Param("sendid")Integer sendid,@Param("receiveid")Integer receiveid);
}